﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using InputTracking = UnityEngine.XR.InputTracking;
using Node = UnityEngine.XR.XRNode;

public class GetHeadsetData : MonoBehaviour
{
    private Node head;
    private Node leftHand;
    private Node rightHand;
    private Quaternion headsetRotation;

    void Start()
    {
        head = Node.Head;
        leftHand = Node.LeftHand;
        rightHand = Node.RightHand;
        headsetRotation = InputTracking.GetLocalRotation(head);
    }

    void Update()
    {
    }

    public float getRotationX()
    {
        return headsetRotation.eulerAngles.x;
    }

    public float getRotationY()
    {
        return headsetRotation.eulerAngles.y;
    }

    public float getRotationZ()
    {
        return headsetRotation.eulerAngles.z;
    }
}
